
<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
  <title>体温填报</title>
  <link rel="icon" href="/static/favicon.ico" type="image/ico">
  <meta name="keywords" content="体温填报">
  <meta name="description" content="体温填报">
  <meta name="author" content="yinqi">
  <link href="/static/css/bootstrap.min.css" rel="stylesheet">
  <link href="/static/layui/css/layui.css" rel="stylesheet">
  <link href="/static/css/materialdesignicons.min.css" rel="stylesheet">
  <link rel="stylesheet" href="/static/js/jconfirm/jquery-confirm.min.css">
  <link href="/static/css/style.min.css" rel="stylesheet">
</head>

<body>
<div class="lyear-layout-web">
  <div class="lyear-layout-container">
    <!--左侧导航-->
    <aside class="lyear-layout-sidebar">

      <!-- logo -->
      <div class="lyear-layout-sidebar-scroll">

        <nav class="sidebar-main">
          <ul class="nav nav-drawer">
            <li class="nav-item nav-item-has-subnav">
              {{if .IsLogin}}
              <a href="/"><i class="mdi mdi-account"></i> 体温提交</a>
              <a href="{{urlfor "TmpController.Get"}}"><i class="mdi mdi-account"></i> 员工体温信息查询</a>
              <a href="{{urlfor "StaffController.Get"}}"><i class="mdi mdi-account"></i> 员工信息</a>
              {{else}}
              <a href="/"><i class="mdi mdi-account"></i> 体温提交</a>
              {{end}}
            </li>
          </ul>
        </nav>
      </div>

    </aside>
    <!--End 左侧导航-->

    <!--头部信息-->
    <header class="lyear-layout-header">

      <nav class="navbar navbar-default">
        <div class="topbar">

          <div class="topbar-left">
            <div class="lyear-aside-toggler">
              <span class="lyear-toggler-bar"></span>
              <span class="lyear-toggler-bar"></span>
              <span class="lyear-toggler-bar"></span>
            </div>
            <span class="navbar-page-title">体温填报</span>
          </div>
          {{if .IsLogin}}
          <ul class="topbar-right">
            <li class="dropdown dropdown-profile">
              <a href="javascript:void(0)" data-toggle="dropdown">
                <span> Test<span class="caret"></span></span>
              </a>
              <ul class="dropdown-menu dropdown-menu-right">
                <li class="divider"></li>
                <li> <a href="{{urlfor "UserController.Logout"}}"><i class="mdi mdi-logout-variant"></i> 退出登陆</a> </li>
              </ul>
            </li>
          </ul>
          {{else}}
          <ul class="topbar-right">
              <li class="dropdown dropdown-profile">
                <a href="javascript:void(0)" data-toggle="dropdown">
                  <span> 信息查询登陆<span class="caret"></span></span>
                </a>
                <ul class="dropdown-menu dropdown-menu-right">
                  <li class="divider"></li>
                  <li> <a href="{{urlfor "UserController.Get"}}"><i class="mdi mdi-logout-variant"></i> 登陆</a> </li>
                </ul>
              </li>
            </ul>
          {{end}}

        </div>
      </nav>

    </header>
    <!--页面主要内容-->
    <main class="lyear-layout-content">

      <div class="container-fluid">

        <div class="row">
          <div class="col-lg-12">
            <div class="card">
              <div class="card-body">
                <div class="card-body">
                  <div class="hitokoto"></div>

                  <hr>

                  <div class="input-group m-b-10">
                    <span class="input-group-addon mdi mdi-update"> 日期</span>
                    <input type="text" class="form-control" value="{{.ctime}}" name="ctime" id="ctiem" disabled="disabled"/>
                  </div>
                  <div class="input-group m-b-10">
                    <span class="input-group-addon mdi mdi-account-circle"> 姓名</span>
                    <input type="text" class="form-control" value="" name="sname" id="sname"/>
                  </div>
                  <div class="input-group m-b-10">
                    <span class="input-group-addon mdi mdi-oil-temperature"> 温度</span>
                    <input type="text" class="form-control" id="temperature" name="temperature" />
                  </div>
                  <div class="input-group m-b-10">
                    <span class="input-group-addon mdi mdi-comment-question-outline"> 身体是否发热</span>
                    <label class="lyear-switch switch-primary">
                      <input type="checkbox"  id="value1" name="value1" />
                      <span></span>
                    </label>
                  </div>
                  <div class="input-group m-b-10">
                    <span class="input-group-addon mdi mdi-comment-question-outline"> 是否咳嗽</span>
                    <label class="lyear-switch switch-primary">
                      <input type="checkbox"  id="value2" name="value2" />
                      <span></span>
                    </label>
                  </div>
                  <div class="input-group m-b-10">
                    <span class="input-group-addon mdi mdi-comment-question-outline"> 是否感冒</span>
                    <label class="lyear-switch switch-primary">
                      <input type="checkbox"  id="value3" name="value3" />
                      <span></span>
                    </label>
                  </div>
                  <div class="input-group m-b-10">
                    <span class="input-group-addon mdi mdi-comment-question-outline"> 是否呼吸困难</span>
                    <label class="lyear-switch switch-primary">
                      <input type="checkbox"  id="value4" name="value4" />
                      <span></span>
                    </label>
                  </div>
                  <div class="input-group m-b-10">
                    <span class="input-group-addon mdi mdi-comment-question-outline"> 是否接触过疑似病例</span>
                    <label class="lyear-switch switch-primary">
                      <input type="checkbox"  id="value5" name="value5" />
                      <span></span>
                    </label>
                  </div>
                  <div class="input-group m-b-10">
                    <span class="input-group-addon mdi mdi-comment-question-outline"> 是否去过湖北</span>
                    <label class="lyear-switch switch-primary">
                      <input type="checkbox"  id="value6" name="value6" />
                      <span></span>
                    </label>
                  </div>
                  <div class="input-group m-b-10">
                    <span class="input-group-addon mdi mdi-comment-question-outline"> 是否接触过湖北接触人员</span>
                    <label class="lyear-switch switch-primary">
                      <input type="checkbox"  id="value7" name="value7" />
                      <span></span>
                    </label>
                  </div>
                  <div class="input-group m-b-10">
                    <span class="input-group-addon mdi mdi-comment-question-outline"> 5月30日后共同生活的家庭成员中去过北京高、中风险区域及北京新发地</span>
                    <label class="lyear-switch switch-primary">
                      <input type="checkbox"  id="value8" name="value7" />
                      <span></span>
                    </label>
                  </div>
                  <div class="input-group m-b-10">
                    <span class="input-group-addon mdi mdi-comment-question-outline"> 5月30日后本人去过北京高、中风险区域</span>
                    <label class="lyear-switch switch-primary">
                      <input type="checkbox"  id="value9" name="value7" />
                      <span></span>
                    </label>
                  </div>
                  <button type="submit" class="btn btn-primary" onclick="SubmitForm();">保存</button>
                </div>
              </div>
              <center><a href="http://beian.miit.gov.cn">京ICP备2020034849号-1</center>
            </div>


          </div>

        </div>

    </main>
    <!--End 页面主要内容-->
  </div>
</div>

<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/static/js/main.min.js"></script>
<script src="/static/js/bootstrap-notify.min.js"></script>
<script type="text/javascript" src="/static/js/messagebox.js"></script>
<script type="text/javascript">
  function SubmitForm(){
    lightyear.loading('show');
    var jsonData = {'Name':$('#sname').val(),
                    'Temperature':$('#temperature').val(),
                    'Value1':$('#value1').prop('checked'),
                    'Value2':$('#value2').prop('checked'),
                    'Value3':$('#value3').prop('checked'),
                    'Value4':$('#value4').prop('checked'),
                    'Value5':$('#value5').prop('checked'),
                    'Value6':$('#value6').prop('checked'),
                    'Value7':$('#value7').prop('checked'),
                    'Value8':$('#value8').prop('checked'),
                    'Value9':$('#value9').prop('checked')}
    $.ajax({
      url:'/post',
      type:'POST',
      dataType:'json',
      contentType:'application/json;charset=UTF-8',
      data:JSON.stringify(jsonData),
      success:function(data){
        if(data['Status']){
          console.log(data);
          lightyear.loading('hide');
          lightyear.notify(data['Msg'], 'success', 3000);
        }
        else{
          console.log(data)
          lightyear.loading('hide');
          lightyear.notify(data["Msg"], 'danger', 100);
        }
      }
    })
  }
</script>
<script>
  $.get("https://v1.hitokoto.cn/", function (data, status) {
    if (status == 'success'){
      $('.hitokoto').text(data.hitokoto)
    }else{
      $('.hitokoto').text(data.hitokoto)
    }
  });
</script>
</body>
</html>